/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.zx.subject.bank.entity;

import java.util.ArrayList;
import java.util.List;

import org.hibernate.validator.constraints.Length;
import org.springframework.beans.factory.parsing.Problem;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.zx.problem.bank.entity.TproblemBank;

/**
 * 题库题目Entity
 * @author zpp
 * @version 2020-03-27
 */
@Table(name="t_subject_bank", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="parent_id", attrName="parentId", label="关联字段"),
		@Column(name="obj_name", attrName="objName", label="题目名称", queryType=QueryType.LIKE),
		@Column(name="total_score", attrName="totalScore", label="总分"),
		@Column(name="num_bars", attrName="numBars", label="条数"),
		@Column(name="obj_type", attrName="objType", label="问题类型"),
		@Column(name="tree_sort", attrName="treeSort", label="排序号"),
		
	}, orderBy="a.tree_sort"
)
public class TsubjectBank extends DataEntity<TsubjectBank> {
	
	private static final long serialVersionUID = 1L;
	private String parentId;		// 关联字段
	private String objName;		// 题目名称
	private Double totalScore;		// 总分
	private Integer numBars;		// 条数
	private Integer objType;		// 问题类型
	private Integer treeSort;
	//问题列表
	private List<TproblemBank> problemList=new ArrayList<TproblemBank>();
	
	public List<TproblemBank> getProblemList() {
		return problemList;
	}

	public void setProblemList(List<TproblemBank> problemList) {
		this.problemList = problemList;
	}

	public Integer getTreeSort() {
		return treeSort;
	}

	public void setTreeSort(Integer treeSort) {
		this.treeSort = treeSort;
	}

	public Integer getObjType() {
		return objType;
	}

	public void setObjType(Integer objType) {
		this.objType = objType;
	}

	public TsubjectBank() {
		this(null);
	}

	public TsubjectBank(String id){
		super(id);
	}
	
	@Length(min=0, max=50, message="关联字段长度不能超过 50 个字符")
	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	
	@Length(min=0, max=255, message="题目名称长度不能超过 255 个字符")
	public String getObjName() {
		return objName;
	}

	public void setObjName(String objName) {
		this.objName = objName;
	}
	
	public Double getTotalScore() {
		return totalScore;
	}

	public void setTotalScore(Double totalScore) {
		this.totalScore = totalScore;
	}
	
	public Integer getNumBars() {
		return numBars;
	}

	public void setNumBars(Integer numBars) {
		this.numBars = numBars;
	}
	
}